import { createRouter, createWebHistory, createMemoryHistory } from 'vue-router'
import Module1 from '@/views/Module1.vue'

console.log(createMemoryHistory);
const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  // mode: 'abstract'
  routes: [
    {
      path: '/',
      component: Module1
    },
    {
      path: '/module1',
      name: 'module1',
      component: () => import('../views/Module1.vue')
    },
    {
      path: '/module2',
      name: 'module2',
      component: () => import('../views/Module2.vue'),
      children: [{
        path: '/page1',
        name: 'page1',
      }]
    },
    {
      path: '/module3',
      name: 'module3',
      component: () => import('../views/Module3.vue')
    },
  ]
})

export default router
